<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Manage your subscriptions</title>
		<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
	</head>
	
	<body>
	<div id="wrapper">
	
		<%@ include file="headerNews.jsp" %>
		
		<%@ include file="menuNews.jsp" %>
		
		<div id="page">
		<div id="page-bgtop">
		<div id="page-bgbtm">
		
		<div id="content">
	
		<div>
			<h1 class="mainText">You have ${reader.numSubs} subscriptions:</h1>
		</div>
		
		<div>
		
			<c:choose>
				<c:when test="${reader.numSubs == '0'}" >
					<p class="mainText">You don't have any subscriptions yet</p>
				</c:when>
				<c:otherwise>
					<c:forEach var="subscription" items="${reader.subscriptions}">
						<p>
							${subscription.topic}
							<!-- only when there are tags -->
							<!-- <c:if test="${subscription.msgSelector != ''}">
								: ${subscription.msgSelector}
							</c:if> -->
						</p>
						<form method="get" action="manageSubs">
							<div>
								<input type="hidden" name="subscription" value="${subscription.topic}" />
<!--   								<input class="button" type="submit" name="action" value="Modify" />-->
   								<input class="button" type="submit" name="action" value="Delete" />
   							</div>
						</form>
					</c:forEach>
				</c:otherwise>
			</c:choose>
			
		</div>
		
		<div style="clear: both;">&nbsp;</div>
		
		</div>
		
		<%@ include file="sidebarNews.jsp" %>
		<div style="clear: both;">&nbsp;</div>
		
		</div>
		</div>
		</div>
		
		<%@ include file="footerNews.jsp" %>

	</div>
	</body>
</html>